Skip to content

feat: merge-train/spartan#20675

Merged
AztecBot merged 22 commits intonextfrom
merge-train/spartan
Feb 20, 2026
Merged

feat: merge-train/spartan#20675
AztecBot merged 22 commits intonextfrom
merge-train/spartan

Conversation

@AztecBot
Copy link
Collaborator

@AztecBot AztecBot commented Feb 19, 2026

BEGIN_COMMIT_OVERRIDE
fix: flag stripping error (#20655)
chore: encode LOG_LEVEL (#20678)
chore: HA setup metrics (#20400)
chore: (A-544) reimplement tx dropping for testing (#20651)
chore(e2e): reload keystore with HA setup (#20685)
feat: adding mempool transactions (#20679)
feat: run low priority eviction rule on chain_pruned (#20687)
feat(ci): add ci-network-bench label for spartan benchmarks (#20698)
END_COMMIT_OVERRIDE

spypsy and others added 3 commits February 16, 2026 14:11
Fixes  [A-355](https://linear.app/aztec-labs/issue/A-355/high-availability-setup-metrics)

Also moves a bunch of types / interfaces from `validator-ha-signer` to `stdlib` to remove cyclic dependencies in `yarn-project`.
It does make sense to **not** have `stdlib` import `validator-ha-signer`
Copy link
Collaborator

@ludamad ludamad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Auto-approved

@AztecBot AztecBot added this pull request to the merge queue Feb 19, 2026
@AztecBot
Copy link
Collaborator Author

🤖 Auto-merge enabled after 4 hours of inactivity. This PR will be merged automatically once all checks pass.

@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Feb 19, 2026
alexghr and others added 19 commits February 19, 2026 11:25
Fixes
[A-355](https://linear.app/aztec-labs/issue/A-355/high-availability-setup-metrics)
Also adds `dateProvider` across the HA Signer codebase

Also moves a bunch of types / interfaces from `validator-ha-signer` to
`stdlib` to remove cyclic dependencies in `yarn-project`.
It does make sense to **not** have `stdlib` import `validator-ha-signer`
- Rewires the tx dropping configuration for mempools
- When enabled, txs will be omitted from the mempool based on
configurable percentage but will return as accepted so that gossip can
propagate

Co-authored-by: danielntmd <danielntmd@nethermind.io>
## Summary

Wraps all `TxPoolV2Impl` handler methods in
`this.#store.transactionAsync()` to ensure DB atomicity. Without this, a
failure mid-way through a handler can leave LMDB in a partially updated
state (e.g., some txs marked as mined but not others), breaking pool
invariants on restart.

`transactionAsync` accumulates writes in memory and flushes atomically
at commit — it does not hold a real LMDB write lock during callback
execution, so including eviction (with its world-state I/O) inside the
transaction is safe.

**Handlers wrapped:**

- **`addPendingTxs`**: already had a transaction for the add loop; moved
`evictAfterNewTxs` inside it
- **`protectTxs`**: wraps the loop that reads from `#txsDB` and calls
`#addTx`
- **`handleMinedBlock`**: wraps markAsMined/clearIfMinedHigher loop and
`evictAfterNewBlock`
- **`handleFailedExecution`**: wraps the `#deleteTxsBatch` call
- **`handleFinalizedBlock`**: wraps steps 2-5 (archive collection, batch
delete, finalize soft-deletes, archive writes)
- **`prepareForSlot`**: wraps entire body from `cleanupSlotDeleted`
through `evictAfterNewTxs`
- **`handlePrunedBlocks`**: wraps entire body from `markFromPrunedBlock`
through `evictAfterChainPrune`

No operation reordering, no API changes, no new types.

## Test plan

- `yarn workspace @aztec/p2p test
src/mem_pools/tx_pool_v2/tx_pool_v2.test.ts` passes
- `yarn workspace @aztec/p2p test src/mem_pools/tx_pool_v2/eviction/`
passes
- `yarn workspace @aztec/p2p test
src/mem_pools/tx_pool_v2/tx_pool_v2.compat.test.ts` passes
- `yarn build` compiles

Part of A-546
## Summary

After a chain prune (reorg), `handlePrunedBlocks()` moves mined
transactions back to pending, which can temporarily push the v2 pool
over its configured size limit. The `EvictionManager` already dispatches
a `CHAIN_PRUNED` event (via `evictAfterChainPrune()`), but
`LowPriorityEvictionRule` only handled `TXS_ADDED` events — returning an
empty result for `CHAIN_PRUNED` and leaving the pool over its limit
until the next `addPendingTxs()` call.

- Extended `LowPriorityEvictionRule.evict()` to also trigger on
`CHAIN_PRUNED` events, so the pool size limit is enforced immediately
after a reorg
- Guarded `context.newTxHashes` access (only present on the `TXS_ADDED`
variant of the discriminated union) with an event-type check, logging a
distinct message for the chain-prune case
- Added unit tests for `CHAIN_PRUNED` handling in
`LowPriorityEvictionRule` (eviction when over limit, no-op when under
limit, no-op when disabled, error handling)
- Added integration tests in `tx_pool_v2.test.ts` exercising the full
add → mine → set limit → prune → verify eviction flow

## Test plan

- [x] Unit tests pass: `yarn workspace @aztec/p2p test
src/mem_pools/tx_pool_v2/eviction/low_priority_eviction_rule.test.ts`
(14 tests)
- [x] Integration tests pass: `yarn workspace @aztec/p2p test
src/mem_pools/tx_pool_v2/tx_pool_v2.test.ts -t 'handlePrunedBlocks'` (12
tests)
- [x] Lint and format pass

Fixes A-560
Adds a new one-time-use PR label  that triggers proving benchmarks in parallel. Results are published to
bench/pr-{NUMBER} on the benchmark dashboard, keeping nightly (bench/next) unaffected.
Adds a new one-time-use PR label that triggers proving benchmarks in
parallel. Results are published to bench/pr-{NUMBER} on the benchmark
dashboard, keeping nightly (bench/next) unaffected.
@AztecBot AztecBot added this pull request to the merge queue Feb 20, 2026
@AztecBot
Copy link
Collaborator Author

🤖 Auto-merge enabled after 4 hours of inactivity. This PR will be merged automatically once all checks pass.

Merged via the queue into next with commit 7a909c6 Feb 20, 2026
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants